<?php require 'gauche.tpl.php';?>  
    <div id="content"> 
        <div>  
            <form action="" method="post">
            <h2>Ajout des compétences : <?php echo $tank['name']; ?></h2>  
            <div class="tank <?php echo $tank['nation'] ?>">
                <img src="<?php echo $tank['image']; ?>" alt="<?php echo $tank['name']; ?>" title="<?php echo $tank['name']; ?>" />
            </div>
            <div>
            <ul>
            <?php $i = 1;
                foreach($equipage as $membre) {?>
                <li>
                    <div class="competences" id="<?php echo $membre['id'].$membre['ordre']; ?>">
                         <div class="role" >
                             <img src="<?php echo $membre['image']?>" alt="<?php echo $membre['role']; ?>" title="<?php echo $membre['title']; ?>" />
                        </div>
                        <?php foreach ($crewSkills as $cSkill) {?>
                            <?php if ($membre['id'].$membre['ordre'] === $cSkill['role_id'].$cSkill['ordre']) {?>
                        <div class="pourcent">
                            <img class="skill" id="<?php echo $cSkill['role_id'].$cSkill['ordre'].'#'.$cSkill['skill_id']?>" alt="<?php $cSkill['name'] ?>" src="<?php echo $cSkill['image']?>" title="<?php echo $cSkill['name']?>" />
                            <input type="text" name="<?php echo $cSkill['role_id'].$cSkill['ordre'].'#'.$cSkill['skill_id']?>" value ="<?php echo $cSkill['valeur']?>" />
                        </div>
                            <?php } ?>
                        <?php }?>
                        
                    </div>
                
                <?php foreach($skills as $skill) {?>
                <?php if ($skill['roles'][$i] === 'ok') {?>
                    <img class="skill" id="<?php echo $membre['id'].$membre['ordre'].'#'.$skill['id'];?>" alt="<?php echo $skill['title']; ?>" src="<?php echo $skill['image']?>" title="<?php echo $skill['title']; ?>" />
                    <?php }?>
                 <?php }?>
                </li>
                <?php $i++;
                }?>
                </ul>
            </div>
           <div class="boutons">
            <input type="hidden" value="<?php echo $tank['tank_id']; ?>" name="tank_id" />
            <input type="hidden" value="<?php echo $_SESSION['account_id']; ?>" name="account_id" />
            <input type="submit" value="Enregistrer" />
            </div>
            </form>  
        </div> 
    </div>